bindings: Hide structs
authorBenjamin Otte <otte@redhat.com>
Tue, 31 Jul 2018 05:36:09 +0000 (07:36 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 18 Jun 2019 19:54:07 +0000 (15:54 -0400)
gtk/gtkbindings.c
gtk/gtkbindings.h

index 3e15fabaa5def03803b88e72be4a18187cfab8b5..5efa63a33cb8753b7d8c1b85a6b60eb9e602488d 100644 (file)
@@ -64,6 +64,99 @@ typedef enum {
   GTK_BINDING_TOKEN_UNBIND
 } GtkBindingTokens;
 
+typedef struct _GtkBindingEntry  GtkBindingEntry;
+typedef struct _GtkBindingSignal GtkBindingSignal;
+typedef struct _GtkBindingArg    GtkBindingArg;
+
+/**
+ * GtkBindingSet:
+ * @set_name: unique name of this binding set
+ * @priority: unused
+ * @entries: the key binding entries in this binding set
+ * @current: implementation detail
+ *
+ * A binding set maintains a list of activatable key bindings.
+ * A single binding set can match multiple types of widgets.
+ * Similar to style contexts, can be matched by any information contained
+ * in a widgets #GtkWidgetPath. When a binding within a set is matched upon
+ * activation, an action signal is emitted on the target widget to carry out
+ * the actual activation.
+ */
+struct _GtkBindingSet
+{
+  gchar           *set_name;
+  gint             priority;
+  GtkBindingEntry *entries;
+  GtkBindingEntry *current;
+};
+
+/**
+ * GtkBindingEntry:
+ * @keyval: key value to match
+ * @modifiers: key modifiers to match
+ * @binding_set: binding set this entry belongs to
+ * @destroyed: implementation detail
+ * @in_emission: implementation detail
+ * @marks_unbound: implementation detail
+ * @set_next: linked list of entries maintained by binding set
+ * @hash_next: implementation detail
+ * @signals: action signals of this entry
+ *
+ * Each key binding element of a binding sets binding list is
+ * represented by a GtkBindingEntry.
+ */
+struct _GtkBindingEntry
+{
+  /* key portion */
+  guint             keyval;
+  GdkModifierType   modifiers;
+
+  GtkBindingSet    *binding_set;
+  guint             destroyed     : 1;
+  guint             in_emission   : 1;
+  guint             marks_unbound : 1;
+  GtkBindingEntry  *set_next;
+  GtkBindingEntry  *hash_next;
+  GtkBindingSignal *signals;
+};
+
+/**
+ * GtkBindingArg:
+ * @arg_type: implementation detail
+ *
+ * A #GtkBindingArg holds the data associated with
+ * an argument for a key binding signal emission as
+ * stored in #GtkBindingSignal.
+ */
+struct _GtkBindingArg
+{
+  GType      arg_type;
+  union {
+    glong    long_data;
+    gdouble  double_data;
+    gchar   *string_data;
+  } d;
+};
+
+/**
+ * GtkBindingSignal:
+ * @next: implementation detail
+ * @signal_name: the action signal to be emitted
+ * @n_args: number of arguments specified for the signal
+ * @args: (array length=n_args): the arguments specified for the signal
+ *
+ * A GtkBindingSignal stores the necessary information to
+ * activate a widget in response to a key press via a signal
+ * emission.
+ */
+struct _GtkBindingSignal
+{
+  GtkBindingSignal *next;
+  gchar            *signal_name;
+  guint             n_args;
+  GtkBindingArg    *args;
+};
+
 /* --- variables --- */
 static GHashTable       *binding_entry_hash_table = NULL;
 static GSList           *binding_key_hashes = NULL;
index 0a172252d4079d67e30138b9b8a4cff186b473e8..9f7acf8b14599cc4da96a76b36a09451c57be0eb 100644 (file)
 G_BEGIN_DECLS
 
 typedef struct _GtkBindingSet    GtkBindingSet;
-typedef struct _GtkBindingEntry  GtkBindingEntry;
-typedef struct _GtkBindingSignal GtkBindingSignal;
-typedef struct _GtkBindingArg    GtkBindingArg;
-
-/**
- * GtkBindingSet:
- * @set_name: unique name of this binding set
- * @priority: unused
- * @entries: the key binding entries in this binding set
- * @current: implementation detail
- *
- * A binding set maintains a list of activatable key bindings.
- * A single binding set can match multiple types of widgets.
- * Similar to style contexts, can be matched by any information contained
- * in a widgets #GtkWidgetPath. When a binding within a set is matched upon
- * activation, an action signal is emitted on the target widget to carry out
- * the actual activation.
- */
-struct _GtkBindingSet
-{
-  gchar           *set_name;
-  gint             priority;
-  GtkBindingEntry *entries;
-  GtkBindingEntry *current;
-};
-
-/**
- * GtkBindingEntry:
- * @keyval: key value to match
- * @modifiers: key modifiers to match
- * @binding_set: binding set this entry belongs to
- * @destroyed: implementation detail
- * @in_emission: implementation detail
- * @marks_unbound: implementation detail
- * @set_next: linked list of entries maintained by binding set
- * @hash_next: implementation detail
- * @signals: action signals of this entry
- *
- * Each key binding element of a binding sets binding list is
- * represented by a GtkBindingEntry.
- */
-struct _GtkBindingEntry
-{
-  /* key portion */
-  guint             keyval;
-  GdkModifierType   modifiers;
-
-  GtkBindingSet    *binding_set;
-  guint             destroyed     : 1;
-  guint             in_emission   : 1;
-  guint             marks_unbound : 1;
-  GtkBindingEntry  *set_next;
-  GtkBindingEntry  *hash_next;
-  GtkBindingSignal *signals;
-};
-
-/**
- * GtkBindingArg:
- * @arg_type: implementation detail
- *
- * A #GtkBindingArg holds the data associated with
- * an argument for a key binding signal emission as
- * stored in #GtkBindingSignal.
- */
-struct _GtkBindingArg
-{
-  GType      arg_type;
-  union {
-    glong    long_data;
-    gdouble  double_data;
-    gchar   *string_data;
-  } d;
-};
-
-/**
- * GtkBindingSignal:
- * @next: implementation detail
- * @signal_name: the action signal to be emitted
- * @n_args: number of arguments specified for the signal
- * @args: (array length=n_args): the arguments specified for the signal
- *
- * A GtkBindingSignal stores the necessary information to
- * activate a widget in response to a key press via a signal
- * emission.
- */
-struct _GtkBindingSignal
-{
-  GtkBindingSignal *next;
-  gchar            *signal_name;
-  guint             n_args;
-  GtkBindingArg    *args;
-};
 
 GDK_AVAILABLE_IN_ALL
 GtkBindingSet *gtk_binding_set_new           (const gchar         *set_name);